#pragma once
#include "IVirtualDiskProxy.h"
#include "MyFile.h"
#include "MyString.h"
#include <assert.h>



class Dir :
	public IDirProxy
{
public:
	Dir(void);
	virtual ~Dir(void);
	virtual const char* GetName();
	virtual ETYPE GetType();
	virtual IFindResult* Find(const char* findstr,bool bRecursion);
	int CreatFile(const MyString& fileName,ifstream& sourceFile);	
	int SetName(const MyString& name);
	void Display();
	void DisplayAllFile();
	Dir** FindSons(const MyString& sonName);
	bool FindSon(Dir* pPresentDir);
	Dir* FindOneSon(const MyString& sonName);
	MyFile** FindFiles(const MyString& fileName);
	MyFile* FindOneFile(const MyString& fileName);
	bool NotNull();
	void DelFile(MyFile** pFile);
	void DelFile(MyFile* pFile);
	void DelAllFile();
public:
	Dir* m_pFather;
	Dir* m_pSon;
	Dir* m_pBrother;
private:
	
private:
	MyString m_name;
	MyFile* m_pFirstFile;
	
};

